#ifndef HELPER_SERVICE_CLIENT_
#define HELPER_SERVICE_CLIENT_
#include <node.h>
#include <node_object_wrap.h>
#include "nodeChannel.h"
#include <mutex>
#include <queue>
#include <memory>
#include<iostream>
#include <thread>
#include <list>
#include <string>

namespace privacy_service
{

  struct camera_access_data {
	camera_access_data() :cb(nullptr) {}
	PersistentPtr cb;
	NodeChannel* channel;
  };
  struct mic_access_data {
	mic_access_data() :cb(nullptr) {}
	PersistentPtr cb;
	NodeChannel* channel;
  };
class Client : public node::ObjectWrap
{
public:
	static void init(v8::Local<v8::Object> exports);
	NodeChannel *channel() { return channel_; }
private:
	Client();
	~Client();
  static void instance(const v8::FunctionCallbackInfo<v8::Value> &args);
	static void initPath(const v8::FunctionCallbackInfo<v8::Value> &args);
	static void getMicAccess(const v8::FunctionCallbackInfo<v8::Value> &args);
	static void getCameraAccess(const v8::FunctionCallbackInfo<v8::Value> &args);
	static void getScreenRecordingAccess(const v8::FunctionCallbackInfo<v8::Value> &args);
	static void getAccessibility(const v8::FunctionCallbackInfo<v8::Value> &args);

	static v8::Persistent<v8::Function> constructor;	
	NodeChannel *channel_;
	mic_access_data mic_access_data_;
	camera_access_data camera_access_data_;
};

} /*namespace privacy_service*/

#endif

